/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.activity.entity;

import com.jeeplus.modules.topic.entity.Topic;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import lombok.Data;

/**
 * 主题活动Entity
 * @author zhych
 * @version 2021-08-27
 */
@Data
public class Activity extends DataEntity<Activity> {
	
	private static final long serialVersionUID = 1L;
    @NotNull(message="主题不能为空")
	@ExcelField(title="主题", fieldType=Topic.class, value="topic.title", align=2, sort=1)
	private Topic topic;		// 主题
	@ExcelField(title="门票类型", align=2, sort=2)
	private String ticketTypeId;		// 门票类型
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message="活动日期不能为空")
	@ExcelField(title="活动日期", align=2, sort=3)
	private String actDate;		// 活动日期
	@ExcelField(title="单价", align=2, sort=4)
	private String price;		// 单价
    @NotNull(message="数量不能为空")
	@ExcelField(title="数量", align=2, sort=5)
	private Integer quantity;		// 数量
    @NotNull(message="警戒值不能为空")
	@ExcelField(title="警戒值", align=2, sort=6)
	private Integer limitValue;		// 警戒值
    @NotNull(message="销量不能为空")
	@ExcelField(title="销量", align=2, sort=7)
	private Integer salesValue;		// 销量
    @NotNull(message="剩余不能为空")
	@ExcelField(title="剩余", align=2, sort=8)
	private Integer surplus;		// 剩余
	@ExcelField(title="显示", align=2, sort=11)
	private String delFlag;		// 显示
	
	public Activity() {
		super();
	}
	
	public Activity(String id){
		super(id);
	}
}